Exceptionally Safe Futures
نویسندگان
چکیده
A future is a well-known programming construct used to introduce concurrency to sequential programs. Computations annotated as futures are executed asynchronously and run concurrently with their continuations. Typically, futures are not transparent annotations: a program with futures need not produce the same result as the sequential program from which it was derived. Safe futures guarantee a future-annotated program produce the same result as its sequential counterpart. Ensuring safety is especially challenging in the presence of constructs such as exceptions that permit the expression of non-local control-flow. For example, a future may raise an exception whose handler is in its continuation. To ensure safety, we must guarantee the continuation does not discard this handler regardless of the continuation’s own internal control-flow (e.g. exceptions it raises or futures it spawns). In this paper, we present a formulation of safe futures for a higher-order functional language with first-class exceptions. Safety can be guaranteed dynamically by stalling the execution of a continuation that has an exception handler potentially required by its future until the future completes. To enable greater concurrency, we develop a static analysis and instrumentation and formalize the runtime behavior for instrumented programs that allows execution to discard handlers precisely when it is safe to do so.
منابع مشابه
Isolating Determinism in Multi-threaded Programs
Futures are a program abstraction that express a simple form of fork-join parallelism. The expression future (e) declares that e can be evaluated concurrently with the future’s continuation. Safe-futures provide additional deterministic guarantees, ensuring that all data dependencies found in the original (non-future annotated) version are respected. In this paper, we present a dynamic analysis...
متن کاملA Concurrent Lambda Calculus with Futures
We introdu e a new on urrent lambda al ulus with futures, (fut), to model the operational semanti s of onurrent extensions of ML. (fut) an safely express a variety of high-level on urren y onstru ts, in luding hannels, semaphores, or ports. Safe implementations of these onstru ts in (fut) annot be orrupted in any well-typed ontext. We prove safety on basis of a linear type system.
متن کاملTransactional Tasks: Parallelism in Software Transactions
Many programming languages, such as Clojure, Scala, and Haskell, support different concurrency models. In practice these models are often combined, however the semantics of the combinations are not always well-defined. In this paper, we study the combination of futures and Software Transactional Memory. Currently, futures created within a transaction cannot access the transactional state safely...
متن کاملBehavioral interface description of an object-oriented language with futures and promises
This paper formalizes the observable interface behavior of an concurrent, object-oriented language with futures and promises. The calculus captures the core of Creol, a language, featuring in particular asynchronous method calls and, since recently, first-class futures. The focus of the paper are open systems and we formally characterize their behavior in terms of interactions at the interface ...
متن کاملIGBT Press-packs for the industrial market
We present a newly developed 4500 V and 2000 A Press-Pack IGBT module for power transmission and industrial voltage drives applications. The module employs SPT IGBT chips with exceptionally low losses and high Safe Operating Area (SOA). The use of SPT IGBT chips in this Press Pack IGBT module allows for higher power densities and the package provides a highly flexible modular platform with very...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009